package com.qf.dao;

import com.qf.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import java.util.List;


/**
 * @description: cool新闻
 * @author: No1
 * @create: 2020-11-30 11:33:07
 */
public interface UserDao {
    /*新增*/
    @Insert("insert into t_user (id,phone,password,flag) values(#{id},#{phone},#{password},#{flag})")
    int insert(User user);

    /*删除*/
    @Delete("delete from t_user where id=#{id}")
    int deleteById(int id);
    /*查询全部*/
    @Select("select * from t_user")
    List<User> all();
}